@extends('layouts.main')

@section('title', '编辑业务员姓名')

@section('content')
<h3>@yield('title')</h3>
<div class="btn-group" role="group">
  <a href="{{ action('BusinessData\SalesmanController@index') }}" class="btn btn-primary">返回列表</a>
</div>

<form class="form-horizontal" method="post" action="{{ action('BusinessData\SalesmanController@update', $model) }}">
    @csrf
    @method('PUT')
    <div class="form-group">
      <label for="job_number" class="col-sm-2 control-label">业务员工号</label>
      <div class="col-sm-3">
        <input class="form-control" id="job_number" name="job_number" placeholder="请输入业务员工号" value="{{ old('job_number', $model->job_number) }}">
        @if($errors->first('job_number'))
        <p class="help-block error">{{ $errors->first('job_number') }}</p>
        @endif
      </div>
    </div>

    <div class="form-group">
      <label for="name" class="col-sm-2 control-label">业务员姓名</label>
      <div class="col-sm-3">
        <input class="form-control" id="name" name="name" placeholder="请输入业务员姓名" value="{{ old('name', $model->name) }}">
        @if($errors->first('name'))
        <p class="help-block error">{{ $errors->first('name') }}</p>
        @endif
      </div>
    </div>

    <div class="form-group">
      <div class="col-sm-offset-2 col-sm-10">
        <button type="submit" class="btn btn-primary">提交</button>
      </div>
    </div>
  </form>

@endsection